{% extends "base.html" %}
{% block title %}{{ page_title|escape }}{% endblock %}
{% block content %}
<ul id="tabs">
  <li><a href="{{ page_title|pageurl }}">View</a></li>
  {% if can_edit %}
  <li><a href="/w/edit?page={{ page_title|uurlencode }}">Edit</a></li>
  {% endif %}
  <li class="active"><a href="/w/history?page={{ page_title|uurlencode }}">History</a></li>
</ul>
<div id="pb" class="wtabs">
<h1>{{ page_title|escape }}</h1>
<p>The following revisions are available:</p>
<form method="GET" action="/w/diff/"><table class="c">
  <thead><tr>
	<th></th><th></th>
	<th>Revision Date</th>
	<th>Revision Comment</th>
  </tr></thead>
  <tbody><tr>
	<td></td>
    <td><input checked="checked" id="r2" name="r2" type="radio" value=""></td>
    <td><a class="int" href="{{ page_title|pageurl }}">{{ page.updated|timezone|date:"Y/m/d H:i:s"}}</a></td>
    <td><a class="int" href="{{ page_title|pageurl }}">{% if page.comment %}{{ page.comment }}{% else %}(current revision){% endif %}</a></td>
  </tr>
{% for revision in revisions %}
  <tr>
	<td><input {% if forloop.first %}checked="checked" {% endif %}id="r1-{{ revision.key }}" name="r1" type="radio" value="{{ revision.key }}"></td>
	<td>{% if not forloop.last %}<input id="r2-{{ revision.key }}" name="r2" type="radio" value="{{ revision.key }}">{% endif %}</td>
    <td><a class="int" href="{{ page_title|pageurl }}?r={{ revision.key }}">{{ revision.created|timezone|date:"Y/m/d H:i:s"}}</a></td>
    <td><a class="int" href="{{ page_title|pageurl }}?r={{ revision.key }}">{% if revision.comment %}{{ revision.comment }}{% else %}(none){% endif %}</a></td>
  </tr>
{% endfor %}</tbody></table><input type="submit" value="diff" /></form>
</div>
{% endblock %}
